Add functionality to set parameter constraint minium#104
Merged
davidwalter2 merged 4 commits intoWMass:mainfrom Jan 27, 2026
Merged
Add functionality to set parameter constraint minium#104davidwalter2 merged 4 commits intoWMass:mainfrom
davidwalter2 merged 4 commits intoWMass:mainfrom
Conversation
cippy
reviewed
Jan 27, 2026
Contributor
cippy
left a comment
There was a problem hiding this comment.
I left two comments, but otherwise fine to merge if CI is fine
rabbit/fitter.py
Outdated
| idx = np.where(self.indata.systs.astype(str) == parm)[0] | ||
| if len(idx) != 1: | ||
| raise RuntimeError( | ||
| f"Expect to find exactly one match for {parm} to set constraint minimum, but found {len(len(idx))}" |
|
|
||
| # tf tensor containing default constraint minima | ||
| theta0default = np.zeros(self.indata.nsyst) | ||
| for parm, val in options.setConstraintMinimum: |
Contributor
There was a problem hiding this comment.
Do I get correctly that setConstraintMinimum sets the initial central value of the parameter (i.e. what we would consider the "pull"?). In that case the option name seems misleading, because Constraints makes me think about the width of the prior of the parameter. Maybe --setParameterMinimum or --setPrefitParameterPull ?
Collaborator
Author
There was a problem hiding this comment.
Constraint minimum is what we usually call this. This sets the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.